﻿<s:SurfaceWindow x:Class="Samples.Sticks.SurfaceWindowMain"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:s="http://schemas.microsoft.com/surface/2008"
                 xmlns:tk="clr-namespace:Black.SurfaceToolkit.Controls;assembly=Black.SurfaceToolkit"
                 Title="Samples.Sticks">
    <s:SurfaceWindow.Resources>
        <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg" />
    </s:SurfaceWindow.Resources>

    <Grid Background="{StaticResource WindowBackground}" 
          Width="1024" Height="768">

        <tk:StickAnalogique x:Name="stick01" 
                            HorizontalAlignment="Left"
                            Margin="200,0,0,0"/>

        <tk:LinearStickAnalogique x:Name="stick02" 
                                  HorizontalAlignment="Right"
                                  Margin="0,0,200,0"/>

        <StackPanel VerticalAlignment="Center"
                    HorizontalAlignment="Left"
                    Margin="200,200,0,0">
            <StackPanel Orientation="Horizontal">

                <TextBlock Text="Value X : "
                       FontSize="14"/>
                <TextBlock Text="{Binding ElementName=stick01, Path=ValueX}"
                       FontSize="14"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">

                <TextBlock Text="Value Y : "
                       FontSize="14"/>
                <TextBlock Text="{Binding ElementName=stick01, Path=ValueY}"
                       FontSize="14"/>
            </StackPanel>
        </StackPanel>
        
        <StackPanel Orientation="Horizontal"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Right"
                    Margin="0,200,200,0">

            <TextBlock Text="Value : "
                       FontSize="14"/>
            <TextBlock Text="{Binding ElementName=stick02, Path=Value}"
                       FontSize="14"/>
        </StackPanel>
    </Grid>
</s:SurfaceWindow>
